3.7.35 \(\int \frac {A+B x}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=69 \[ \frac {(a+b x) (A b-a B) \log (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {640, 608, 31} \begin {gather*} \frac {(a+b x) (A b-a B) \log (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

(B*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/b^2 + ((A*b - a*B)*(a + b*x)*Log[a + b*x])/(b^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2
])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 608

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[(b/2 + c*x)/Sqrt[a + b*x + c*x^2], Int[1/(b/2
+ c*x), x], x] /; FreeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0]

Rule 640

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(a + b*x + c*x^2)^(p +
 1))/(2*c*(p + 1)), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {A+B x}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{b^2}+\frac {\left (2 A b^2-2 a b B\right ) \int \frac {1}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx}{2 b^2}\\ &=\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{b^2}+\frac {\left (\left (2 A b^2-2 a b B\right ) \left (a b+b^2 x\right )\right ) \int \frac {1}{a b+b^2 x} \, dx}{2 b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{b^2}+\frac {(A b-a B) (a+b x) \log (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 40, normalized size = 0.58 \begin {gather*} \frac {(a+b x) ((A b-a B) \log (a+b x)+b B x)}{b^2 \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((a + b*x)*(b*B*x + (A*b - a*B)*Log[a + b*x]))/(b^2*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

IntegrateAlgebraic [B]  time = 0.42, size = 196, normalized size = 2.84 \begin {gather*} \frac {\left (a \sqrt {b^2} B+a b B-A b^2-A \sqrt {b^2} b\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}-a-\sqrt {b^2} x\right )}{2 \left (b^2\right )^{3/2}}+\frac {\left (-a \sqrt {b^2} B+a b B-A b^2+A \sqrt {b^2} b\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}+a-\sqrt {b^2} x\right )}{2 \left (b^2\right )^{3/2}}+\frac {B \sqrt {a^2+2 a b x+b^2 x^2}}{2 b^2}-\frac {B x}{2 \sqrt {b^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

-1/2*(B*x)/Sqrt[b^2] + (B*Sqrt[a^2 + 2*a*b*x + b^2*x^2])/(2*b^2) + ((-(A*b^2) - A*b*Sqrt[b^2] + a*b*B + a*Sqrt
[b^2]*B)*Log[-a - Sqrt[b^2]*x + Sqrt[a^2 + 2*a*b*x + b^2*x^2]])/(2*(b^2)^(3/2)) + ((-(A*b^2) + A*b*Sqrt[b^2] +
 a*b*B - a*Sqrt[b^2]*B)*Log[a - Sqrt[b^2]*x + Sqrt[a^2 + 2*a*b*x + b^2*x^2]])/(2*(b^2)^(3/2))

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 25, normalized size = 0.36 \begin {gather*} \frac {B b x - {\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

(B*b*x - (B*a - A*b)*log(b*x + a))/b^2

________________________________________________________________________________________

giac [A]  time = 0.16, size = 45, normalized size = 0.65 \begin {gather*} \frac {B x \mathrm {sgn}\left (b x + a\right )}{b} - \frac {{\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

B*x*sgn(b*x + a)/b - (B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*log(abs(b*x + a))/b^2

________________________________________________________________________________________

maple [A]  time = 0.05, size = 43, normalized size = 0.62 \begin {gather*} \frac {\left (b x +a \right ) \left (A b \ln \left (b x +a \right )-B a \ln \left (b x +a \right )+B b x \right )}{\sqrt {\left (b x +a \right )^{2}}\, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/((b*x+a)^2)^(1/2),x)

[Out]

(b*x+a)*(A*ln(b*x+a)*b-B*ln(b*x+a)*a+B*b*x)/((b*x+a)^2)^(1/2)/b^2

________________________________________________________________________________________

maxima [A]  time = 0.61, size = 52, normalized size = 0.75 \begin {gather*} -\frac {B a \log \left (x + \frac {a}{b}\right )}{b^{2}} + \frac {A \log \left (x + \frac {a}{b}\right )}{b} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

-B*a*log(x + a/b)/b^2 + A*log(x + a/b)/b + sqrt(b^2*x^2 + 2*a*b*x + a^2)*B/b^2

________________________________________________________________________________________

mupad [B]  time = 1.47, size = 79, normalized size = 1.14 \begin {gather*} \frac {B\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{b^2}+\frac {A\,\ln \left (a+b\,x+\sqrt {{\left (a+b\,x\right )}^2}\right )}{b}-\frac {B\,a\,b\,\ln \left (a\,b+\sqrt {{\left (a+b\,x\right )}^2}\,\sqrt {b^2}+b^2\,x\right )}{{\left (b^2\right )}^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/((a + b*x)^2)^(1/2),x)

[Out]

(B*(a^2 + b^2*x^2 + 2*a*b*x)^(1/2))/b^2 + (A*log(a + b*x + ((a + b*x)^2)^(1/2)))/b - (B*a*b*log(a*b + ((a + b*
x)^2)^(1/2)*(b^2)^(1/2) + b^2*x))/(b^2)^(3/2)

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 20, normalized size = 0.29 \begin {gather*} \frac {B x}{b} - \frac {\left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/((b*x+a)**2)**(1/2),x)

[Out]

B*x/b - (-A*b + B*a)*log(a + b*x)/b**2

________________________________________________________________________________________